<?php
/**
 * Custom Slideshow
 *
 * @package Custom Slideshow
 * @subpackage Custom Slideshow
 * @version   1.0
 * @author    Mat Van de Loop, Matthew Williams, Jessie Vass
 * @copyright 
 * @license 
 *
 */
 
defined('_JEXEC') or die('Restricted access');

class modCustomSlideshow 
{
	function loadScripts(&$params)
	{
	}
	
	static function getImages($folder)
	{
		$images = array();
		$handle=opendir($folder);
		$i=0;
		echo 'var galleryarray=new Array();';
		while(($item=readdir($handle)) !== false)
		{
			if(substr($item, 0, 1)!=".")
			{
				if (strpos($item, ".jpg") || strpos($item, ".gif") || strpos($item, ".png") || strpos($item, ".jpeg"))
				{
					$images[$i] = $item;
					echo 'galleryarray['.$i.']="'.$item .'";';
					//echo "<br />";
				}	
				$i++;
			}
		}
		closedir($handle);
		return($images)
	}
	
	static function getFolder(&$params)
	{
	}
  
}
?>